<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<title>系统管理-功能管理</title>
		<jsp:include page="../../include/base.jsp"></jsp:include>
		<jsp:include page="../../include/common.jsp"></jsp:include>
		<script src="../MainHandler.js" type="text/javascript"></script>
		<script src="funNodePanel.js" type="text/javascript"></script>
		
		<style type="text/css">
	    body {
	        margin:0;padding:0;border:0;width:100%;height:100%;overflow:visible;
	    }    
	    
	    </style>
	</head>
	
	<body>
		<div class="mini-toolbar" style="border:0;font-size:12px;padding-left:6px;">
		     <a id="system_fun_add" class="mini-button" iconCls="icon-addnew" plain="false" visible="false" onclick="FunNodePanel.add">新增功能</a>
		     <a id="system_fun_edit" class="mini-button" iconCls="icon-edit" plain="false" visible="false" onclick="FunNodePanel.edit">编辑功能</a>
		     <a id="system_fun_del" class="mini-button" iconCls="icon-remove" plain="false" visible="false" onclick="FunNodePanel.del">删除功能</a>
		     <span class="separator"></span>
		     <a id="system_fun_refresh" class="mini-button" iconCls="icon-btn-refresh" plain="false" visible="false" onclick="FunNodePanel.reload">刷新</a>
		</div>
   
    <div class="mini-fit" >
        <div id="funNodeTreegrid" class="mini-treegrid"
					style="width: 100%; height: 100%;" showTreeIcon="true" expandOnLoad=0
					treeColumn="name" idField="funId" parentField="pfunId" showCheckBox="false"
					resultAsTree="false" iconField="funIcon" checkRecursive="true" autoCheckParent="true"
					borderStyle="border-bottom:0;border-left:0;border-right:0;">
            <div property="columns">
                <div name="name" field="name" width="180" headerAlign="center" allowSort="true">功能名称</div>    
                <div field="funCode" width="150" headerAlign="center" allowSort="true">功能编码</div>                            
                <div field="funIcon" width="150"  headerAlign="center">图标样式</div>
                <div field="func" width="100%" allowSort="true" headerAlign="center">调用函数</div>                                    
                <div field="sort" width="50" align="center" allowSort="true" headerAlign="center">顺序号</div>
                <div field="funType" width="100" allowSort="true" align="center" headerAlign="center">类型</div>
                <div field="remark" width="150" allowSort="true" align="center" headerAlign="center">备注</div>
            </div>
        </div> 
</div>

	<div id="funNodeEditWindow" class="mini-window" title="管理功能"
			style="width: 500px;" showModal="true" allowResize="false"
			allowDrag="true">
			<div id="funNodeEditform" class="form">
				<input class="mini-hidden" name="funId" />
				<input id="funNodeEditWindowPfunId" class="mini-hidden" name="pfunId" />
				<table style="width: 100%;">
					<tr>
						<td style="width: 100px;" align="right">上级节点：</td>
						<td style="width: 300px;" align="center">
							<input id="funNodeTreeselect" name="pfunName" class="mini-treeselect"  style="width: 250px" multiSelect="false" 
        						textField="name" valueField="funId" onValueChanged="FunNodePanel.treeSelectChanged" 
        						checkRecursive="true" autoCheckParent="true" /></td>
					</tr>
					<tr>
						<td align="right">功能名称：</td>
						<td align="center">
						<input name="name" class="mini-textbox" required="true" style="width: 250px" /></td>
						<td style="color: red;">必填</td>
					</tr>
					<tr>
						<td align="right">功能编码：</td>
						<td align="center">
							<input name="funCode" class="mini-textbox" style="width: 250px" required="true" />
						</td>
						<td style="color: red;">必填</td>
					</tr>
					<tr><td align="right">功能类型：</td>
						<td align="center">
							<input id="funComboBox" name="funType" class="mini-combobox" required="true" style="width: 250px" 
							textField="name" valueField="id" />
						</td>
						<td style="color: red;">必填</td>
					</tr>
					<tr>
						<td align="right">调用函数：</td>
						<td align="center">
							<input name="func" class="mini-textarea" style="width: 250px" height="60px" />
						</td>
					</tr>
					<tr>
						<td align="right">链接地址：</td>
						<td align="center">
							<input name="className" class="mini-textarea" style="width: 250px;height: 80px" />
						</td>
						<td style="color: green;">优先调用连接地址，在其为空的情况下使用调用函数</td>
					</tr>
					<tr>
						<td align="right">服务名称：</td>
						<td align="center">
							<input name="objName" class="mini-textarea" style="width: 250px" />
						</td>
					</tr>
					<tr>
						<td align="right">图标样式：</td>
						<td align="center">
							<input id="funIconCombobox"  name="funIcon" class="mini-combobox" style="width: 250px" textField="value" valueField="id"
							onValueChanged="FunNodePanel.iconComBValueChange" />
						</td>
					</tr>
					<tr>
						<td align="right">排列顺序：</td>
						<td align="center">
							<input name="sort" class="mini-spinner" style="width: 250px" vtype="int" />
						</td>
						<td style="color: red;">数字</td>
					</tr>
					<tr>
						<td align="right">备注说明：</td>
						<td align="center">
							<input name="remark" class="mini-textbox" style="width: 250px" />
						</td>
					</tr>
					<tr>
						<td
							style="text-align: center; padding-top: 5px; padding-right: 20px;"
							colspan="6">
							<a class="mini-button " plain="true" iconCls="icon-add"
								onclick="FunNodePanel.save">保存</a>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<a class="mini-button" plain="true" iconCls="icon-remove"
								onclick="FunNodePanel.closeButton">关闭</a>
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<a class="mini-button " plain="true" iconCls="icon-add"
								onclick="FunNodePanel.save('yes');">另存为</a>
						</td>
					</tr>
				</table>
			</div>
		</div>
	
	<script type="text/javascript">
       		mini.parse();
			FunNodePanel.init();
	</script>
	</body>
</html>
